<?php

// +----------------------------------------------------------------------
// | MyCentOS
// +----------------------------------------------------------------------
// | Copyright (c) 2014 http://www.mycentos.com, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 琥珀 <317559272@qqq.com><http://www.mycentos.com>
// +----------------------------------------------------------------------
// | @date  : 2015-04-21 14:45:34
// +----------------------------------------------------------------------
// | @Last Modified by:  琥珀
// +----------------------------------------------------------------------
// | @Last Modified time: 2015-04-21 14:56:25
// +-----------------------------------------------------------------------

namespace Home\Widget;
use Think\Controller;
Class NavWidget extends Controller{
    //获取菜单
    public function nav(){
        $nav = M('Category')->select();
        $nav = list_to_tree($nav);
        $this->assign('nav',$nav);
        $this->display('Widget/nav');
    }
}
?>